/**
 * yeahmobi.com Inc.
 * Copyright © 2014 YeahMobi | All Rights Reserved.
 */   
    
package com.ndp.fb.fbagent.service.impl;

import com.alibaba.dubbo.config.annotation.Service;
import com.ndp.fb.fbagent.service.PageFBService;
import com.ndp.fb.model.fbagent.result.businesses.FBPage;
import com.restfb.Parameter;

/**
 * @Title: PageFBServiceImpl.java
 * @Copyright: Copyright © 2015
 * @Description: 
 * @Company: yeahmobi
 * @Created on 下午1:40:04
 * @author giser.yang
 */
@Service
public class PageFBServiceImpl extends AbstractFBagentService implements PageFBService {

	/** 
	 * @discription
	 * @author giser.yang       
	 * 创建时间 2015年6月19日 下午1:40:04      
	 * @param pageId
	 * @param token
	 * @return     
	 * @see com.ndp.fb.fbagent.service.PageFBService#getPageByPageId(java.lang.Long, java.lang.String)     
	 */

	@Override
	public FBPage getPageByPageId(Long pageId, String token) {
		String fields = "can_post,category,checkins,cover,has_added_app,is_community_page,is_published,likes,link,name,talking_about_count,were_here_count,picture";
		Parameter[] parameterList = new Parameter[]{Parameter.with("fields", fields)};
        return syncFetchObjectResult("/"+pageId, token, FBPage.class,parameterList);
	}

}
